#include<stdio.h>
#include<stdlib.h>
#include<time.h>

#define SIZE 300000

int a[SIZE];

void MaoPao(int a[],int n)
{
    int i,j;
    for(i = 0;i < n;i++) {
        for(j = 0;j < n-i-1;j++) {
            if(a[j] > a[j+1]) {
                int temp = a[j];
                a[j] = a[j+1];
                a[j+1] = temp;
            }
        }
    }
}

int main(int argc,char *argv[])
{
	int i;
	srand((unsigned)time(NULL));
	for(i = 0;i < SIZE;++i) {
		a[i] = rand()%10000;
	}
	MaoPao(a,SIZE);
	for(i = 0;i < SIZE;++i) {
		printf("%d ",a[i]);
	}
	printf("\n");
	
}
